﻿module Sustainalytics.EsgRatings.Admin {

    import Common = Sustainalytics.Common;
    import CommonAdmin = Sustainalytics.Common.Admin;

    export class WeightMatrixDeleteConfirmationController {

        // Ctor.
        constructor(
            private $rootScope: ng.IScope,
            private $scope: ng.IScope,
            private $q: ng.IQService,
            private $location: ng.ILocationService,
            private $modal: Common.IModal,
            private $modalInstance: Common.IModalInstance) {

            var ctx = this;
            $scope['deleteWeightMatrix'] = ctx;
        }

        public closeDialog()
        {
            var ctx = this;
            ctx.$modalInstance.close(false);
        }

        public deleteWeightMatrixAlert() {
            var ctx = this;
            var def = this.$q.defer();
            this.$modalInstance.close(true);
        }
    }


    // register controller with ESGRatings.Admin Angular module
    var mod = angular.module(esgRatingsAdminModuleName);
    
    mod.controller('WeightMatrixDeleteConfirmationController',
        ['$rootScope', '$scope', '$q', '$location', '$modal', '$modalInstance', WeightMatrixDeleteConfirmationController]);
} 
  